package net.vinote.smart.platform.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.vinote.smart.platform.service.action.ElectronicContractAction;
import net.vinote.smart.platform.service.bean.ElectronicContract;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


@Controller
public class ElectronicContractController {
	@RequestMapping("contract_info.html")
	public ModelAndView viewContract(HttpServletRequest request,
			HttpServletResponse response) {
		ElectronicContractAction action = new ElectronicContractAction();
		ElectronicContract contract = action.getContractById(request
				.getParameter("id"));
		ModelAndView mav = new ModelAndView("contract_info");
		mav.addObject("contract", contract);
		return mav;
	}
}
